//
//  testViewController.m
//  game
//
//  Created by iD Student on 7/13/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "testViewController.h"

@interface testViewController ()

@end

@implementation testViewController
@synthesize label;

- (void)viewDidLoad
{
    [super viewDidLoad];
    x=0;
    [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(changelabel) userInfo:nil repeats:YES];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)viewDidUnload
{
    [self setLabel:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        return YES;
    }
}

-(void) changelabel
{
    label.text= [NSString stringWithFormat:@"%d",x];
    x++;
}

@end
